package dataGoods

import (
	goods_pb "mxshop/api/goods/v1"
	IGoods "mxshop/app/mxshop_api/api/internal/data/goods"
)

type goodsFactory struct {
	gc goods_pb.GoodsClient
}

func (gf *goodsFactory) Banner() IGoods.Banner {
	return newBanner(gf.gc)
}

func (gf *goodsFactory) Brand() IGoods.Brand {
	return newBrand(gf.gc)
}

func (gf *goodsFactory) Category() IGoods.Category {
	return newCategory(gf.gc)
}

func (gf *goodsFactory) CategoryBrand() IGoods.CategoryBrand {
	return newCategoryBrand(gf.gc)
}

func (gf *goodsFactory) Goods() IGoods.Goods {
	return newGoods(gf.gc)
}

func NewGoods(gc goods_pb.GoodsClient) IGoods.GoodsData {
	return &goodsFactory{
		gc: gc,
	}
}
